import { RedisdbService } from './redisdb.service';
import { Global, Module } from '@nestjs/common';
import { RedisModule } from 'nestjs-redis';

@Global()
@Module({
    imports: [
        RedisModule.register({
            port: parseInt(process.env.REDIS_PORT) || 6379,
            host: process.env.REDISURL || '127.0.0.1',
            password: process.env.REDIS_PASS || ''
        })
    ],
    controllers: [],
    providers: [RedisdbService],
    exports: [RedisdbService]
})
export class RedisdbModule { }

